package com.oocl.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "orders_comm")
@GenericGenerator(name = "comments_uuid", strategy = "uuid")
public class OrderComment implements Serializable {
	@Id
	@Column(name="id",length=36)
	@GeneratedValue(generator="comments_uuid")
	private String id;
	@Column(name = "oid", length = 36)
	private String oid;
	@JoinColumn(name="cid",referencedColumnName="cid")
	@ManyToOne
	private Clients client;
	@JoinColumn(name="icnum",referencedColumnName="icnum")
	@ManyToOne
	private Merchants merchant;
	@Column(name="comments",length=50)
	private String comments;
	@Column(name="oclevel",length=1)
	private double oclevel;
	 @Column(name="ctime")
	 @Temporal(TemporalType.TIMESTAMP)
	private Date ctime;
	 @Column(name="rtime")
	 @Temporal(TemporalType.TIMESTAMP)
	private Date rtime;
	@Column(name="reply",length=50)
	private String reply;
	@Column(name="status",length=1)
	private String status ;   //0:未回复；1：已回复

	
	
	
	public OrderComment() {
		super();
	}


	public OrderComment(String id, String oid, Clients client,
			Merchants merchant, String comments, double oclevel, Date ctime,
			Date rtime, String reply, String status) {
		super();
		this.id = id;
		this.oid = oid;
		this.client = client;
		this.merchant = merchant;
		this.comments = comments;
		this.oclevel = oclevel;
		this.ctime = ctime;
		this.rtime = rtime;
		this.reply = reply;
		this.status = status;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}


	public String getOid() {
		return oid;
	}


	public void setOid(String oid) {
		this.oid = oid;
	}


	public Clients getClient() {
		return client;
	}

	public void setClient(Clients client) {
		this.client = client;
	}

	public Merchants getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchants merchant) {
		this.merchant = merchant;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public double getOclevel() {
		return oclevel;
	}

	public void setOclevel(double oclevel) {
		this.oclevel = oclevel;
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	public Date getRtime() {
		return rtime;
	}

	public void setRtime(Date rtime) {
		this.rtime = rtime;
	}

	public String getReply() {
		return reply;
	}

	public void setReply(String reply) {
		this.reply = reply;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	
}
